//
//  RAMCollectionAuxView.m
//  RAMCollectionViewFlemishBondLayoutDemo
//
//  Created by Rafael Aguilar Martín on 20/10/13.
//  Copyright (c) 2013 Rafael Aguilar Martín. All rights reserved.
//

#import "RAMCollectionAuxView.h"

@implementation RAMCollectionAuxView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        //底头像
        _icon_image = [[UIImageView alloc]initWithFrame:CGRectMake(1, 1, WIDTH-2, HEIGHT/4+19)];
        _icon_image.image=[UIImage imageNamed:@"组-3"];
        
        _icon_image.userInteractionEnabled = YES;
        UITapGestureRecognizer* singleTap1 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(addDevies)];
        [_icon_image addGestureRecognizer:singleTap1];
        [self addSubview:_icon_image];
        
        //排序
        _list_num_label=[[UILabel alloc]initWithFrame:CGRectMake(0,HEIGHT/6-10, 30, 30)];
        _list_num_label.text= @"1";
        //        _list_num_label.backgroundColor = [UIColor orangeColor];
        _list_num_label.font = [UIFont systemFontOfSize:18];
        _list_num_label.textColor=[UIColor whiteColor];
        _list_num_label.textAlignment=NSTextAlignmentCenter;
        [_icon_image addSubview: _list_num_label];
        
        //歌曲名
        _song_name=[[UILabel alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(_list_num_label.frame), WIDTH/2-10, 30)];
        _song_name.text=@"Do you know";
        _song_name.font = [UIFont systemFontOfSize:18];
        _song_name.textColor=[UIColor whiteColor];
        _song_name.textAlignment= NSTextAlignmentLeft;
        [_icon_image addSubview: _song_name];
        
        //昵称 + VIP + 财富等级 + 歌手等级
        _user_name=[[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_list_num_label.frame),HEIGHT/6-10,WIDTH/2-30, 30)];
        _user_name.text=@"黑神";
        //        _user_name.backgroundColor = [UIColor redColor];
        _user_name.textColor=[UIColor whiteColor];
        _user_name.font = [UIFont systemFontOfSize:18];
        _user_name.textAlignment=NSTextAlignmentLeft;
        [_icon_image addSubview: _user_name];
        
        _VIP =[[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_user_name.frame), HEIGHT/6+10,20,10)];
        _VIP.image = [UIImage imageNamed:@"vip_one"];
        //        [_icon_image addSubview:_VIP];
        
        _star_one =[[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_VIP.frame), HEIGHT/6+5,25,20)];
        _star_one.image = [UIImage imageNamed:@"star_one"];
        //        [_icon_image addSubview:_star_one];
        
        _star_two =[[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_star_one.frame), HEIGHT/6+5,25,20)];
        _star_two.image = [UIImage imageNamed:@"star_two"];
        //        [_icon_image addSubview:_star_two];
        
        
    }
    
    return self;
}

-(void)addDevies{
    
    NSLog(@"点击榜首");
    
}

- (void)prepareForReuse
{
    [super prepareForReuse];
    
//    self.label.text = nil;
}

@end
